﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MDT.LifeSewagePlatform.Conmmon
{
    public static class IdentityAuth
    {
        public static async Task<bool> Auth(string placeType, int AreaID)
        {
            return await Task.Run(() =>
            {
                if (AreaID == -1)
                {
                    if (placeType.Contains("市"))
                    {
                        return true;
                    }
                    return false;
                }
                return true;
            });

        }

        public static async Task<bool> Auth(string placeType)
        {
            return await Task.Run(() =>
            {

                if (placeType.Contains("市"))
                {
                    return true;
                }
                return false;
            });

        }

        public static async Task<bool> Admin(string Role)
        {
            return await Task.Run(() =>
            {
                if (Role.Contains("Admin"))
                {
                    return true;
                }
                return false;
            });
        }
    }
}
